<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var date = new Date()
      var m = date.getMonth() + 1
      m = '' + m
      m = m.padStart(2, '0')
      var y = date.getFullYear()
      var d = date.getDate().toString().padStart(2, '0')
      var week = date.getDay()
      var arr = ['Sun', 'Mon', 'Tue', 'Wed', 'Tru', 'Fri', 'Sat']
      var h = date.getHours().toString().padStart(2, '0')
      var min = date.getMinutes().toString().padStart(2, '0')
      var s = date.getSeconds().toString().padStart(2, '0')
      document.write(`${y}-${m}-${d} ${h}:${min}:${s} ${arr[week]}`)
    </script>
  </body>
</html>
